//Wdg2DAxis.cpp
/*    widgetpp - A simple C++ wrapper of DISLIN graphic library               */
/*                                                                            */
/*    Copyright (C) 2012  Mirko Cambi (email: mirko.cambi@gmail.com)          */
/*                                                                            */
/*    This program is free software: you can redistribute it and/or modify    */
/*    it under the terms of the GNU General Public License as published by    */
/*    the Free Software Foundation, either version 3 of the License, or       */
/*    (at your option) any later version.                                     */
/*                                                                            */
/*    This program is distributed in the hope that it will be useful,         */
/*    but WITHOUT ANY WARRANTY; without even the implied warranty of          */
/*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           */
/*    GNU General Public License for more details.                            */
/*                                                                            */
/*    You should have received a copy of the GNU General Public License       */
/*    along with this program.  If not, see <http://www.gnu.org/licenses/>.   */

#include "Wdg2DAxis.hpp"
#include "WdgColors.hpp"
#include "dislin.h"

using namespace wdgpp;

Wdg2DAxis::Wdg2DAxis(
): _xname("X-axis"), _yname("Y-axis"),
   _xticks(9), _yticks(10),
   _background(colors::black)
{
}

void Wdg2DAxis::set_name(const std::string &xname, const std::string &yname)
{
   _xname = xname;
   _yname = yname;
}

void Wdg2DAxis::set_background(int color)
{
   _background = color;
}

void Wdg2DAxis::set_ticks(int xticks, int yticks)
{
   _xticks = xticks;
   _yticks = yticks;
}

void Wdg2DAxis::draw() const
{
   name(_xname.c_str(), "x");
   name(_yname.c_str(), "y");

   //labdig(-1,"x");
   ticks(_xticks, "x");
   ticks(_yticks, "y");
}
